import inspect
from diffsynth import ModelManager

# 打印ModelManager的所有方法
print("ModelManager methods:")
for name, method in inspect.getmembers(ModelManager, inspect.isfunction):
    print(f"{name}: {inspect.signature(method)}")

# 创建实例并打印实例方法
mm = ModelManager()
print("\nModelManager instance methods:")
for name, method in inspect.getmembers(mm, inspect.ismethod):
    print(f"{name}: {inspect.signature(method)}")

# 特别检查load_models方法
if hasattr(mm, 'load_models'):
    print("\nload_models method signature:")
    print(inspect.signature(mm.load_models))
    print("\nload_models method source:")
    try:
        print(inspect.getsource(mm.load_models))
    except Exception as e:
        print(f"Could not get source: {e}")